package com.ofek.eventos.db.datatypes.helptypes;

import java.io.Serializable;

import com.ofek.applicationbase.forms.FormField;
import com.ofek.base.db.DataField;
import com.ofek.base.db.DataTypeClass;
@DataTypeClass(defineKeys=" FOREIGN KEY (ts,tsOwner,eid,eidOwner) REFERENCES EventInfo(ts,tsOwner,eid,eidOwner) ON DELETE CASCADE")
public class TextFieldInEvent implements Serializable {
	@DataField(isKey = true)
	@FormField
	public long eid;
	@DataField(isKey = true)
	@FormField
	public int eidOwner;
	@DataField(isKey = true)
	@FormField
	public long ts;
	@DataField(isKey = true)
	@FormField
	public int tsOwner;
	@DataField(isKey = true, references = FieldInfo.class, referenceField = "fid")
	@FormField
	public long fid;
	@DataField
	@FormField
	public String value;
	public TextFieldInEvent() {
		// TODO Auto-generated constructor stub
	}
	public TextFieldInEvent(final long eid, final long fid, final String value) {
		this.eid = eid;
		this.fid = fid;
		this.value = value;
	}
	public TextFieldInEvent(final long fid) {
		this.fid = fid;
	}

	@Override
	public String toString() {
		return value;
	}
}
